cmake_minimum_required(VERSION 3.9)
project(proj3)

include_directories(
    ${PROJECT_SOURCE_DIR}/include
    ${PROJECT_SOURCE_DIR}/../proj1/include
    ${PROJECT_SOURCE_DIR}/../proj2/include
    )

link_directories(
    ${PROJECT_BINARY_DIR}/../proj1
    ${PROJECT_BINARY_DIR}/../proj2
    )

add_executable(proj3 src/app.cpp)

target_link_libraries(proj3 proj1 proj2)